<?php

namespace App\V3\V3_2_6\Models;

use DateTimeInterface;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class ExpressModel extends Model
{


    use HasFactory;

    //toArray 时间转换问题
    protected function serializeDate(DateTimeInterface $date)
    {
        return $date->format('Y-m-d H:i:s');
    }
    protected $table = 'express';

    static  public function getQqueryExpressCount($condition, $startTime, $endTime)
    {
        return self::where($condition)
                ->whereBetween('created_at', [$startTime, $endTime])
                ->count();
    }
}
